{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "Cross-validation with ShuffleSplit"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.text.Text at 0x7146ba8>"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAlkAAAGxCAYAAABRB6M1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X+cXHV97/HXJ7ubhPwgQZJsCCAWVGq1D7UqrVfbrlVr\nVRR6vZcKtYLY2qqttloFxF6SUhV6a9XaXu0PwVTbimgp0PojRVh/QgWhGH5FWvkVQjZEICEkJPvj\nc/+YExyW3ZlNMt/ZndnX8/GYR86c+cw5n/1md/a953znTGQmkiRJaq05092AJElSNzJkSZIkFWDI\nkiRJKsCQJUmSVIAhS5IkqQBDliRJUgGGLKnLRcRNEfEL093HdIqIX42IuyNie0Q8ewr1V0XE6e3o\nTVL3MmRJHSwi7oiIXxq37tSI+Obe+5n5rMz8RpPtHBURYxHRra8J/xd4W2YenJk3tnLDE/0flNCu\n/UhqnW59QZVmu329ynBUz4kCvRARPSW2uw+OAm6Z5h4kzTKGLKnL1R8BiYgXRMS1EbEtIu6LiD+r\nyr5e/ftQdUrtZ6Pm/RFxZ0RsjohPR8TBddt9Y/XY/VVd/X7OiYiLI+IzEfEQcGq17+9ExIMRcW9E\nfDwieuu2NxYRb42IH1T9/XFEHB0R346IhyLic/X1477GiXpdHBFzI+Jhaq9134+I2yd5/ssj4taq\nt49TFzarHr4WEVsjYktEfHbvOETE3wNPBi6vxu0Pq/Wfr8b3wYgYjIifqtveqyLi5qr+noh4V91j\nx0fEDdXzvhURP91oP5JmNkOW1H0aHY36GPDRzFwCHAN8vlq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nfBZ4VEccCfx8RX56+tqbV3iN65wAf\nycydEQd+mc8DnviemRdm5vMzcwB4CNhA7S/Mf64evxYYjYhDmeIFTLvBBOPyA4CI6KF2OuiiuvJ7\nqTvSxewal9uBN2bmv1SPfwF4QVU+K8Zlou+VzPxBZr4iM19A7XNB/7sqnxVjUmcoIvb+hbkS2PtJ\nv5ONw2wZn8nGZTKzflwi4ghqv5d+ozrFDI7LYzJzA7U/9J7F7BiXycbkZ4E/jYgfAr8PvC8i3sZ+\njkkr3l24vPr3ycCvUptndCnwS9X6pwNzM/NH1P4i/7WImBsRPwE8ldoE364zybhA7S+oWzNzU135\nZcDrZ+m4/AOwKSJ+sVr/UmrBC2bJuEz0vVK3bg7wfmDvB5t1+5gEjz9Efxm1if8Ap1J7bdm7/gnj\nUB3231adAgngjXXP6WRTHZfxzwEeOx0ya8clIpYC/wqckZnX7C12XOIp1R/+RMRRwLHAnV06LlMa\nk8z8hcw8OjOPBj4KfDAz/99+j0kLZu1/g9q8khuAgWpdH/AZYD1wHfCLdfVnUXsn0K1U7yjrxttE\n41KtvxB4ywT1s3ZcgBdV3yc3AFcDz51N4zLJmLyD2lHh26of8q7/XqH2h8gmapO27wbeBBxCbeL/\nBmrvvFzabByA51WvPbcDH5vur2saxuUOYCuwvar/ydk+LsDZwMPA9dXP2fX8+F3vs3lc3lC99lxf\nvQa/pm47XTMu+/ozVPe8c3j8uwv3eUy8GKkkSVIBB3y6UJIkSU9kyJIkSSrAkCVJklSAIUuSJKkA\nQ5YkSVIBhixJkqQCDFmSJEkF/H/oLVSkeHN60AAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x3dac198>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "\n",
    "import numpy as np\n",
    "true_mean = 1000\n",
    "true_std = 10\n",
    "N = 1000\n",
    "dataset = np.random.normal(loc= true_mean, scale = true_std, size=N)\n",
    "import matplotlib.pyplot as plt\n",
    "f, ax = plt.subplots(figsize=(10, 7))\n",
    "ax.hist(dataset, color='k', alpha=.65, histtype='stepfilled',bins=50)\n",
    "ax.set_title(\"Histogram of dataset\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "999.89204062337774"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "holdout_set = dataset[:500]\n",
    "fitting_set = dataset[500:]\n",
    "estimate = fitting_set[:N/2].mean()\n",
    "estimate"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "999.9625653902167"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_mean = dataset.mean()\n",
    "data_mean"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x9108b70>]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAlkAAAE4CAYAAABouOYlAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmclXXd//H3h0FEIXcWBUQEBMSl9I4wLMcww7qT7jQV\nzSXvyj270/unWQl3epemJoaaYooaCoqKYpoi0sQdSqKiCLKJyKZsAooMyyyf3x+fOTEMs5yZOfu8\nno/Hecycc65zXV+4Zua8z3f5XObuAgAAQGq1ynYDAAAAChEhCwAAIA0IWQAAAGlAyAIAAEgDQhYA\nAEAaELIAAADSIKmQZWZDzGy+mS00s2vq2KbYzGaZ2Rwz+1tqmwkAAJBfrKE6WWbWStJCSYMlfShp\npqSz3H1+tW32lvSKpJPdfa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eJAbcrL\now7a734Xk+SvuCIWSE2bFlMcunSJEiJt20av7Be/GPP/vvWtwisNsWVL1KKbPDluK1ZE727NxQsM\nF+aZq66KeQDXXFP/dqNHx5vK88/v+tyiRTGx9vzzG97P669LZ54Zr8nXYpi57qOPYu5HKld85YPV\nq2Nez+mnxx/hE09sfMBcv1764Q+jFtHo0XVv99hjMez35pu1LyZwj0sWPfRQrK6qPiF848aYJ3f0\n0dLddzf8ezB1qnT55bHC7JZb4rGFC3e+deoUw8J9+zbu3wvkAvcoenvvvTuC1fHH7ximlyKETJgQ\nxWFXrozCsz/4QeNWUOail16KkDljRhRZPvnkuB17bO3zEglZeebuu2Muxb331r1NeXlMVn3oobrn\nvFRWxqfyhj6Zu8cP0h13xNLmTHjppWhfOpf55wr3uNzJEUdELZ2W5v33Y8L3X/4Scz9OOCEmFX/9\n67EKq7ZAU1YWgfShh+JnZehQ6b776l+JmSiLccQRsRhk27boAfv00/h6660RfiZNigBU06ZNcdHt\n3r3jWLV9Kl+5csfq39tvj17nljiHB6jprbdiccSECfFh5dxzpdNOS25ucS556qnomRs1KlYxJ9N+\nQlaeefHF+HQ8ZUrd2yRqt/z976k55oMPxhDK+efH8GE6V72tXRtvhGax3PonPynsN6px46I+zhtv\nFF65hsZavz5+vp97LlZ4rV8fw4mJS4H06hV/rMeNi+/PPz+GHJO9xuZHH8UHho0bI3TttVestv3c\n52JYY9So+ifHb94sffvbEfx69owPApWVUTairCzafskl8XOby6UMgGzZujV+v8eOjR7fIUMicA0Z\nkvurUx99ND5EPf/8zlNwGkLIyjOLFkXX5JIltT9fWRlDMLfdltqeoCVL4pPIAw/E/JfLLotfjFQP\nIZ57bvQkXH75jiGkkSNz/xewKdasiXP17LPxJo+dffZZ9C4tWLDjciC9eknnnRdfm2Lr1gjtTQ20\npaXxx7a8PH72i4ria6tW0WtcqGU3gFRbvz4uev/ww/H+ct55MZyY7BB6RUXUEnzyyRia/OlP66/7\n1hwPPBDXwpw8Werfv3GvJWTlme3b45P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/VXuYc5cHzGwvSV9x9zGS5O7l7v6JOH/5\npEhSOzNrLWkPRd1Izl+Ocvd/SNpQ4+G6ztepksZX/V5+IGmRdq0bupNMhazaCpp2ydCx0Qxmdoik\nz0uaIalTYtWou6+S1DF7LUM9bpf035KqT7jk3OWHHpLWmdmYquHe0Wa2pzh/ecHdP5R0m6RlinD1\nibtPEecv33Ss43zVVXi9TtTBRp3MrL2kJyRdWdWjVXOVBKsmcoyZfUvS6qqeyPq6sTl3uam1pGMk\n3eXuxyhWa18rfvfygpnto+gF6S7pIEWP1jni/OW7Jp+vTIWslZIOrna/a9VjyFFVXd1PSPqzuz9T\n9fDqxDUpzayzpDXZah/qNEjSqWb2vqRxkr5mZn+WtIpzlxdWSFru7q9X3X9SEbr43csPJ0l6393X\nu3uFpImSvizOX76p63ytlNSt2nYNZplMhax/FTQ1szaKgqaTMnRsNM0Dkt519zuqPTZJ0gVV358v\n6ZmaL0J2uft17n6wux+q+D2b6u7nSnpWnLucVzVEsdzMEpddHyxprvjdyxfLJA00s7ZVE6IHKxag\ncP5ym2nnnv+6ztckSWdVrRjtIamXpNfq3XGm6mSZ2RDFqplEQdObMnJgNJqZDZI0TdI7im5Sl3Sd\n4ofpcUWSXyrpDHffmK12on5mdoKkq9z9VDPbT5y7vGBmRysWLewm6X1Fcecicf7ygpkNV3zAKZM0\nS9IPJX1OnL+cZGaPSiqWtL+k1ZKGS3pa0gTVcr7M7OeS/lNxfq9098n17p9ipAAAAKnHxHcAAIA0\nIGQBAACkASELAAAgDQhZAAAAaUDIAgAASANCFgAAQBoQsgAAANKAkAUAAJAG/x/2LKT7a79TGQAA\nAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x8fe0240>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from sklearn.model_selection import ShuffleSplit\n",
    "shuffle_split = ShuffleSplit(n_splits=100, test_size=.5, random_state=0)\n",
    "mean_p = []\n",
    "estimate_closeness = []\n",
    "for train_index, not_used_index in shuffle_split.split(fitting_set):\n",
    "    mean_p.append(fitting_set[train_index].mean())\n",
    "    shuf_estimate = np.mean(mean_p)\n",
    "    estimate_closeness.append(np.abs(shuf_estimate - dataset.mean()))\n",
    "\n",
    "plt.figure(figsize=(10,5))\n",
    "plt.plot(estimate_closeness)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
